package c.e.a.b.e.c;

import com.huawei.hms.framework.common.ContainerUtils;
import java.util.Map.Entry;

/* compiled from: com.google.android.gms:play-services-measurement-base@@18.0.0 */
public final class a7 implements Comparable<a7>, Entry<K, V> {
    public final K a;
    public V b;
    public final /* synthetic */ t6 c;

    public a7(t6 t6Var, Entry<K, V> entry) {
        Comparable comparable = (Comparable) entry.getKey();
        Object value = entry.getValue();
        this.c = t6Var;
        this.a = comparable;
        this.b = value;
    }

    public final /* synthetic */ int compareTo(Object obj) {
        return this.a.compareTo(((a7) obj).a);
    }

    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Entry)) {
            return false;
        }
        Entry entry = (Entry) obj;
        Comparable comparable = this.a;
        Object key = entry.getKey();
        boolean equals = comparable == null ? key == null : comparable.equals(key);
        if (equals) {
            Object obj2 = this.b;
            obj = entry.getValue();
            boolean equals2 = obj2 == null ? obj == null : obj2.equals(obj);
            if (equals2) {
                return true;
            }
        }
        return false;
    }

    public final /* synthetic */ Object getKey() {
        return this.a;
    }

    public final V getValue() {
        return this.b;
    }

    public final int hashCode() {
        Comparable comparable = this.a;
        int i = 0;
        int hashCode = comparable == null ? 0 : comparable.hashCode();
        Object obj = this.b;
        if (obj != null) {
            i = obj.hashCode();
        }
        return hashCode ^ i;
    }

    public final V setValue(V v) {
        t6 t6Var = this.c;
        int i = t6.g;
        t6Var.h();
        Object obj = this.b;
        this.b = v;
        return obj;
    }

    public final String toString() {
        String valueOf = String.valueOf(this.a);
        String valueOf2 = String.valueOf(this.b);
        StringBuilder stringBuilder = new StringBuilder(valueOf2.length() + (valueOf.length() + 1));
        stringBuilder.append(valueOf);
        stringBuilder.append(ContainerUtils.KEY_VALUE_DELIMITER);
        stringBuilder.append(valueOf2);
        return stringBuilder.toString();
    }

    public a7(t6 t6Var, K k, V v) {
        this.c = t6Var;
        this.a = k;
        this.b = v;
    }
}
